package cn.gson.boot.model.pojos;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

/*发货详情*/

@Entity
public class Fahuoxiangqing {
    private int fhxqId;//发货详情id
    private Productt productt;//产品id
    private Integer fhcpNum;//发货产品数量
    private BigDecimal fhcpPrice;//发货产品价格
    private Fahuo fahuoByFhId;//发货对象（发货id）

    private BigDecimal fhcpXiaoji;//小计

    @Basic
    @Column(name = "fhcp_xiaoji")
    public BigDecimal getFhcpXiaoji() {
        return fhcpXiaoji;
    }

    public void setFhcpXiaoji(BigDecimal fhcpXiaoji) {
        this.fhcpXiaoji = fhcpXiaoji;
    }

    @Id
    @Column(name = "fhxq_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "seq")
    public int getFhxqId() {
        return fhxqId;
    }

    public void setFhxqId(int fhxqId) {
        this.fhxqId = fhxqId;
    }

    @ManyToOne
    @JoinColumn(name = "productt_id", referencedColumnName = "productt_id")
    public Productt getProductt() {
        return productt;
    }

    public void setProductt(Productt productt) {
        this.productt = productt;
    }


    @Basic
    @Column(name = "fhcp_num", nullable = true, precision = 0)
    public Integer getFhcpNum() {
        return fhcpNum;
    }

    public void setFhcpNum(Integer fhcpNum) {
        this.fhcpNum = fhcpNum;
    }

    @Basic
    @Column(name = "fhcp_price", nullable = true, precision = 2)
    public BigDecimal getFhcpPrice() {
        return fhcpPrice;
    }

    public void setFhcpPrice(BigDecimal fhcpPrice) {
        this.fhcpPrice = fhcpPrice;
    }



    @ManyToOne
    @JoinColumn(name = "fh_id", referencedColumnName = "fh_id")
    public Fahuo getFahuoByFhId() {
        return fahuoByFhId;
    }

    public void setFahuoByFhId(Fahuo fahuoByFhId) {
        this.fahuoByFhId = fahuoByFhId;
    }
}
